home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The X-Philes (2nd Revision)
/
The X-Philes Number 1 (1995).iso
/
xphiles
/
hp95
/
freyja.exe
/
lha
/
FCALC.DOC
< prev
next >
Wrap
Text File
|
1992-04-13
|
14KB
|
528 lines
Freyja Calculator
HP-45A-like Calculator
DESIGN
This calculator is a non-programmable, scientific calculator, roughly
equivalent to an HP-45A or a 41C with some functions missing. It
offers some extra functions (e.g., binary math). The internal
arithmetic is done using the C language "double" arithmetic supplied
with your C compiler.
This documentation assumes that you already know all about RPN
calculators in general and the HP calculators in particular.
ENTERING NUMBERS
Numbers look pretty much as you would expect.
- Real numbers can consist of the digits 0-9, a radix mark ('.' or
','), digit separators (the non-radix mark '.' or ','), an exponent
character ('e' or 'E'), and an exponent. Use the '~' or '`'
characters (or F9) for entering negative numbers or exponents.
- Binary numbers start with a # sign, then contain the digits 0-9,
a-f, or A-F. They are interpreted and displayed according to the
current default base. They will also be masked to the current word
size.
In all cases, number termination is by means of a space, ^G, ^M, ^J,
^[, $, %, *, +, -, or / character.
Some operators include the above termination characters as part of
their names (e.g., "1/X"). You can enter these by starting the
command with a single quote ("'"). Doing so disables the "immediate
action" of the %, *, +, -, /, `, and ~ characters.
Numbers are converted between real and binary as needed (and expected)
by the operators. There are no illegal combinations, although there
may be illegal values (e.g., square root of a negative number).
DISPLAY
Numbers are displayed according to their type and the current display
settings. These settings are:
- Real numbers: Std, Fix, Sci, Eng, the latter three requiring a 0-...
number of digits (only Std is supported for now). There are two other
settings:
radix mark . or ,
digit separators shown Y or N
(if Y, the separator is the one of , or . that is not the current
radix mark)
- Binary numbers: always displayed in the current base #XXXY, where Y
is 'b', 'o', 'd', or 'h', designating Bin, Oct, Dec, and Hex modes.
STACK LIFT
The calculator handles stack lift more like an HP-28C/S or 48S/SX
than a "normal" HP. Number (and command name entry) is handled in a
separate place and not the X register. The entered number (or
command) can be edited arbitrarily before it is terminated by a
closing function that is actually executed. Hence, the concept of
stack lift does not play a very important role. All operations leave
stack lift enabled except for:
CLX
ENTER^ (or T)
\GS+ (or ~+)
\GS- (or ~-)
No operations are neutral.
COMMANDS
^G Exit calculator w/no action.
^H Delete the preceeding character or clear X if no preceeding character.
^J Exit calculator, inserting X into the buffer at the point. Leave
the mark at the start of the number and the point at the start.
^M Finish the current number or operator.
^[ Exit calculator w/no action.
SP Finish the current number or operator.
$ Return to the editor.
% Percentage.
' Start a quoted command.
* Multiplication.
+ Addition.
- Subtraction.
/ Division.
^ Exponentiation.
? Help.
` CHS or NEG.
~ CHS or NEG.
^? Delete the preceeding character or clear X if no preceeding character.
MSDOS only:
F1 Help.
F9 CHS or NEG.
F10 Exit Freyja.
Alt-B Last X, immediate execute.
Alt-C X<>Y, immediate execute.
Alt-L CHS, immediate execute.
Alt-M RCL.
Alt-N STO.
Alt-V RDN, immediate execute.
Alt-X 1/X, immediate execute.
Alt-Z SQRT, immediate execute.
COMMAND LIST
These commands are all executed by typing their name, then completing
them with a space, ^M, or ^J. If a space is used as the terminator,
it does not do an implied Enter.
%%% register designator:
# numeric
X,Y,Z,T,L stack
A alpha
\GS,~ summation
.%%% indirect
IND%%% indirect
### number
&&& label:
# numeric
"string" alpha label
.### indirect
@@@ buffer name
name does
% percent
%CH percent change
%TOT percent of total
* multiply
+ add
- subtract
/ divide
1/X inverse (not typable: must use INV)
10^X common exponent (not typable: must use ALOG)
<%%% recall
>%%% store
ABS absolute value
ACOS arc cosine
ALOG common exponent
AND bitwise and
ASIN arc sin
ATAN arc tangenet
B set binary mode
CF### clear flag
CLRG clear registers
CLST clear stack
CLX clear x
CL\GS CL~ clear summation
COS cosine
D set decimal mode
D-R convert degrees to radians
DATE- subtract the number of days in X to date in Y using the current
calenndar
DATE+ add the number of days in X to date in Y using the current
calenndar
DATE return the current date
DDAYS compute the number of days between two dates using the current
calenndar
DEC convert octal to decimal
DEFAULT restore default settings
DEG set degrees mode
DIGSEPOFF set the digit separator mark to not displayed
DIGSEPON set the digit separator mark to displayed
DMY set D.MY mode
DOW figure the day of the week for a date (0=Sunday)
ENTER^ enter
E^X natural exponent
E^X-1 natural exponent - 1
FACT factorial
FRC fractional part
GRAD set grads mode
H set hexadecimal mode
HELP help
HMS- subtract two times in H.MS notation
HMS+ add two times in H.MS notation
HMS convert decimal hours to H.MS
HR convert H.MS to decimal hours
INT integer part
INV inverse
L recall last x
LASTX recall last x
LN natural logarithm
LN1+X natural logarithm + 1
LOG common logarithm
MDY set M.DY mode
MEAN average
MEMLOAD ask for a filename and load memory from that file
MEMSAVE ask for a feilename and save memory to that file
MEMVIEW view interpreted calculator memory in %calc% buffer
MEM\GS view interpretad summation memory in %calc% buffer
MEM~ view interpretad summation memory in %calc% buffer
MOD modulus
NEG negate
NOT bitwise not
NULL no op
O set octal mode
OCT convert decimal to octal
OR bitwise or
P-R convert polar to rectangular
PI constant pi
R roll down
R-D convert radians to degrees
R-P convert rectangular to polar
RAD set radians mode
RADIX, set the radix mark to ,
RADIX. set the radix mark to .
RCL%%% recall (try rcl~78)
RDN roll down
R^ roll up
S swap: x<>y
SDEV standard deviation
SF### set flag
SIGN sign of number
SIN sin
SQRT square root
ST%%% store
STD set display all digits notation
STO%%% store
T enter
TAN tangent
TIME return the current time
TRACEOFF turn trace mode off
TRACEON turn trace mode on
WSIZE set the word size
WSIZE? get the word size
X360 set calendar mode to 360 day calendar
X365 set calendar mode to 365 day calendar
X<>%%% swap with
XACTUAL set calendar mode to actual calendar
XCAL generates a calendar for the specified month in the %cal%
buffer
XCALD moves the calendar by X months
XEQ@@@ switches input to the specified buffer (sort of like
executing a program)
XOR bitwise xor
XRND takes an argument from the stack (small integer) and
rounds the number to that number of decimal places
XROOT xth root of y
X^2 square
Y^X exponentiation
\GD% delta %
\GS+ ~+ summation plus
\GS- ~- summation minus
\GSREG ~REG set summation register
\GSREG? ~REG? what is summation register pointer
^ exponentiation
CALCUALTOR-RELATED FREYJA COMMANDS
^[ ^A Mark the current number (mark to start, point to end).
^[ ^B Move backward one number.
^[ ^E Mark the current number and enter it into the calculator.
^[ ^F Move forward one number.
^[ ^M Insert a printed copy of the number in the X register into the
buffer. If an argument is supplied, do ^[ ^A ^W first.
^[ ^U Invoke the calculator.
^[ ^] Load the program specified by the argument into the keyboard macro.
SYSTEM BUFFERS USED
%alpha% the alpha register
%cal% calendar output
%calc% miscellaneous calculator output (e.g., status dump)
%print% printer output (not cleared before use)
%trace% trace output (not cleared before use)
FREYJA-LOCAL FLAGS
start size default use
65 8 BINSIZE word size for binary integers
73 2 hex binary number mode:
flag 74 73
0 0 decimal
0 1 octal
1 0 binary
1 1 hexadecimal
75 2 uns complement mode
(not implemented)
flag 76 75
0 0 unsigned
0 1 1's
1 0 2's
1 1 unsigned (don't use)
77 2 actual calendar mode
flag 78 77
0 0 360 day
0 1 actual
1 0 365 day
1 1 actual (don't use)
78 2 unused
81 16 11 summation base register
97 1 0 if set, commands must be entered in upper case
98 1 0 if set, the program is assumed to *not* contain
line numbers: if present, they will be interpeted.
line numbers are of the form:
0 or 1 space characters
2-4 digit characters
1 space character or 1 label marker
(not implemented)
99 1 0 if set, the alpha register will be truncated to
24 bytes after every alpha operation
(not implemented)
100 1 0 if set, filenames will be truncated to 7 characters
before being used
(not implemented)
SAVING MEMORY
Calculator memory can be saved with the MEMSAVE command. You are
asked for a file name and all memory (registers, flags, stack, etc.)
is saved to the specified file. A file's contents can be loaded with
the MEMLOAD command.
PROGRAMS
A program is created by means of the ^X ( and ^X ) commands. This
program can be saved the ^[ ^] command. This command inserts the
current keyboard macro contents at the point. You can then use normal
editing commands to manpulate and save it.
The typical sequence is:
- create a keyboard macro
- create an empty buffer
- give the ^[ ^] command
- save the buffer
You now have your program saved. You can execute it in one of two ways:
1: - find the file with your program
- XEQ<name>
2: - find the file with your program
- give the ^U ^[ ^] command to copy the buffer to the keyboard macro
- execute it with ^]
The second method allows you to give a repeat count.
LATER
41CX functions to be done later (??? don't know the character code(s) yet).
These are basically the alpha register, program control, extended memory,
alarm, and other specialized functions.
ADATE date to alpha
ADV paper advance
ALEN length of alpha
ALMCAT alarm catalog
ALMNOW activate oldest alarm
ANUM number in alpha to x
AOFF alpha keyboard off
AON alpha keyboard off
APPCHR append char to record
APPREC append record to file
ARCL recall alpha
ARCLREC append record to alpha
AROT rotate alpha
ASHF alpha shift
ASROOM bytes available in file
ASTO%%% alpha store
ATIME time to alpha
ATIME24 time in 24 hour clock to alpha
ATOX left byte of alpha to x
AVIEW alpha view
BEEP beep
CAT### catalogs
CLA clear alpha
CLALMA clear alarm in alpha
CLALMX clear alarm in x
CLD clear display
CLFL clear file
CLK12 12 hour clock mode
CLK24 24 hour clock mode
CLKEYS clear keys
CLKT display time
CLKTD display time and date
CLOCK display running clock
CLP clear programn
CLRALMS clear alarms
CLRGX clear registers according to x
COPY copy program
CORRECT correct the time
CRFLAS create text file
CRFLD create data file
DELCHR delete char from record
DELREC delete record from file
DSE decrement and skip if equal
ED invoke editor
EMDIR extended memory directory
EMDIRX extended memory directory of Xth file
EMROOM room in extended memory
END end program
ENG### engineering notation
F### function (soft, menu) key ###
FC?### is flag clear
FC?C### is flag clear and clear
FLSIZE return file size
FIX### fixed notation
FS?### is flag set
FS?C### is flag set and clear
GETAS get file
GETKEY get a key
GETKEYX get a key timed
GETP get program
GETR get registers
GETREC get record
GETRX get a registers according to X
GETSUB get a subroutine
GETX get a register
GTO&&& goto
INSCHR insert a char into a record
INSREC insert a record into a file
ISG increment and skip if greater
LBL&&& label (.### not allowed, printed listings
always prefixed with a 206 (octal) character)
OFF turn off
ON turn on
PACK pack memory
PASN programmable key assingment
PCLPS programmable clear program
POSA find position in alpha
POSFL find position in file
PROMPT display a prompt
PSE pause
PSIZE program size
PURFL purge file
RCLAF recall clock accuracy
RCLALM recall alarm
RCLFLAG recall flags
RCLPT recall file pointer
RCLPTA recall file pointer according to alpha
RCLSW recall stopwatch
REGMOVE move register block
REGSWAP swap register block
RESZFL change file size
RND round
RTN return
RUNSW run stopwatch
SAVEAS save text file
SAVEP save program
SAVER save registers
SAVERX save registers according to x
SAVEX save a register
SCI### scientific notation
SEEKPT see a file
SEEPTA see a file according to alpha
SETAF set clock accuracy factor
SETDATE set date
SETIME set time
SETSW set stopwatch
SIZE### set curtain
SIZE? what is curtain
STOFLAG store flags
STOP stop
STOPSW stop the stopwatch
SW invoke the stopwatch
SWPT set stopwatch register pointer
T+X adjust clock
TONE### tone
VIEW%%% view
X!=%%%? X\035%%%? compare
X!=0? X\0350? compare
X!=Y? X\035Y? compare
X<%%%? compare
X<0? compare
X<Y? compare
X<=%%%? compare
X<=0? compare
X<=Y? compare
X<>F swap X and flags
X<>Y swap
X=%%%? compare
X=0? compare
X=Y? compare
X>%%%? compare
X>0? compare
X>Y? compare
X>=%%%? compare
X>=0? compare
X>=Y? compare
XEQ&&& subroutine call
XROM###,### xrom call
XTOA x to left byte of alpha
XYZALM set specified alarm
??? append
Plus the TVM functions and fractions (a la the 32SII).